﻿<local:DocumentBase x:Class="WPFExcelReport.JLTVK05APP"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core" 
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    Loaded="Window_Loaded" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:tra="clr-namespace:WPFExcelReport.TranslationByMarkupExtension;assembly=ReflectionStudio.Core"
                    FontSize="14" 
                    Background="White" 
                    HorizontalAlignment="Stretch"
                    Margin="0,0,0,0" 
                    VerticalAlignment="Stretch"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000  x:Key="d10000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="Auto" MinHeight="20"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel Name="zoneCommand" Margin="4,0,51,6" Grid.ColumnSpan="3">
                <Label Content="系统" Width="Auto" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink"  TabIndex="1" />
                <Label Content="语言" Width="Auto" Margin="0,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                <TextBox IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" TabIndex="2" />
                <Label Content="用户名" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                <TextBox Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="False" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" TabIndex="3" />
                <Label Content="密码" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow"  KeyboardNavigation.TabIndex="1" TabIndex="4" />
                <Button Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="Auto" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True" TabIndex="5">
                    登录
                </Button>
                <TextBlock Name="Administration"></TextBlock>
                <CheckBox FontSize="14" Content="属于评审组" Name="IsBelongs2V9"
                              Visibility="Hidden"></CheckBox>
                <TextBlock FontSize="14" MinWidth="200" Width="Auto" Name="MemberV9" Background="#FF00AF00"
                               Visibility="Hidden"></TextBlock>
                <TextBlock Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel>
               <WrapPanel Name="ZoneOrder">
                    <TextBlock Width="Auto"><Run Text="订单号:"/></TextBlock>
                    <TextBox   x:Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper" TabIndex="11" />
                    <TextBox   x:Name="txtVKPAUFLFD" KeyDown="txtVKPAUFLFD_KeyDown" MaxLength="6" Width="80" Margin="0,0,0,0"  HorizontalAlignment="Left" TabIndex="12" />
                    <Button  Height="30"  Width="30" Margin="10,0,0,0" x:Name="btnGetVKPOS" Click="btnGetVKPOS_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                        <Button.Background>
                            <ImageBrush ImageSource="Images/Search.png" />
                        </Button.Background>
                    </Button>
                    <Button  Height="30"  Width="30" Margin="10,0,0,0" Click="btnSave_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                        <Button.Background>
                            <ImageBrush ImageSource="Images/Save.png" />
                        </Button.Background>
                    </Button>
                </WrapPanel>
              
            </WrapPanel>
            <StackPanel> 
                  <WrapPanel>
                        <Label Content="交期:"  Width="90" Margin="3" VerticalAlignment="Center" Background="White" />
                    <TextBox Background="White"  Height="23" HorizontalAlignment="Left" Margin="3"  Name="txtDate" KeyDown="Txtdate_KeyDown"
                                                                 Text="{Binding Path=VKPLIEFTERM, Source={StaticResource ResourceKey=vwVKPOS}}" VerticalAlignment="Center" Width="120" />
                        <CheckBox Name="UpdateAll" VerticalAlignment="Center"  IsChecked="True"
                          Background="White"
                          >
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="2" ScaleY="2" />
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                    <DatePicker Width="195" Name="dPicker"  SelectedDateChanged="dPicker_SelectedDateChanged"/>

                </WrapPanel>           
                <WrapPanel>
                    <Label Content="坯布完成:" Width="90" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Background="White" />
                    <TextBox Background="LightYellow"  Height="23" HorizontalAlignment="Left" Margin="3" Name="txtDate1"  KeyDown="Txtdate_KeyDown"
                                                                 Text="{Binding Path=VKPVERZTERM1, Source={StaticResource ResourceKey=vwVKPOS}}" VerticalAlignment="Center" Width="120" />
                    <CheckBox Name="UpdateAll1" VerticalAlignment="Center"  IsChecked="True"
                          Background="White"
                          >
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2" ScaleY="2" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <DatePicker Width="195" Name="dPicker1"  SelectedDateChanged="dPicker1_SelectedDateChanged"/>
                </WrapPanel>
                <WrapPanel>
                    <Label Content="整理完成:" Width="90" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Background="White" />
                    <TextBox Background="LightGreen"  Height="23" HorizontalAlignment="Left" Margin="3"   Name="txtDate2"  KeyDown="Txtdate_KeyDown"
                                                                 Text="{Binding Path=VKPVERZTERM2, Source={StaticResource ResourceKey=vwVKPOS}}" VerticalAlignment="Center" Width="120" />
                    <CheckBox Name="UpdateAll2" VerticalAlignment="Center"  IsChecked="True"
                          Background="White"
                          >
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2" ScaleY="2" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <DatePicker Width="195" Name="dPicker2"  SelectedDateChanged="dPicker2_SelectedDateChanged"/>
                </WrapPanel>
                <WrapPanel>
                    <Label Content="研发给销售:" Width="90"  HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Background="White" />
                    <TextBox Background="LightCoral" Height="23" HorizontalAlignment="Left" Margin="3"   Name="txtDate3" KeyDown="Txtdate_KeyDown"
                                                                 Text="{Binding Path=VKPVERZTERM3, Source={StaticResource ResourceKey=vwVKPOS}}" VerticalAlignment="Center" Width="120" />
                    <CheckBox Name="UpdateAll3" VerticalAlignment="Center"  IsChecked="True"
                          Background="White"
                          >
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2" ScaleY="2" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <DatePicker Width="195" Name="dPicker3"  SelectedDateChanged="dPicker3_SelectedDateChanged"/>
                </WrapPanel>
                <WrapPanel>
                    <Label Content="销售寄样:" Width="90" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Background="White" />
                    <TextBox Background="LightCyan"  Height="23" HorizontalAlignment="Left" Margin="3"   Name="txtDate4" KeyDown="Txtdate_KeyDown"
                                                                 Text="{Binding Path=VKPVERZTERM4, Source={StaticResource ResourceKey=vwVKPOS}}" VerticalAlignment="Center" Width="120" />
                    <CheckBox Name="UpdateAll4" VerticalAlignment="Center"  IsChecked="True"
                          Background="White"
                          >
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2" ScaleY="2" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <DatePicker Width="195" Name="dPicker4" SelectedDateChanged="dPicker4_SelectedDateChanged"/>
                </WrapPanel>
            </StackPanel>
            <WrapPanel >
                
                <WrapPanel Name="ZoneAccount">
                </WrapPanel>
                <WrapPanel Name="ZoneAuditing">

                </WrapPanel>
            </WrapPanel>
            <WrapPanel>
                
            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.Row="2"  Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="2"  >
            <DataGrid VerticalAlignment="Top"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKPOS}}"  
                              HeadersVisibility="Column"
                              x:Name="dgVKPOS"    
                      MaxHeight="400"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="类型"   Width="Auto"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPZUSATZ, Converter={StaticResource ResourceKey=gb2312}}" Header="标准"  Width="Auto" MinWidth="20"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种"   Width="Auto"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="颜色"   Width="Auto"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPMENGE1, Converter={StaticResource ResourceKey=d100}}" Header="数量" Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位"  Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="需期"  Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="交期"  Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPVERZTERM1}" Header="坯布完成"  Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPVERZTERM2}" Header="整理完成"  Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPVERZTERM3}" Header="研发给销售"  Width="Auto" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPVERZTERM4}" Header="销售寄样"  Width="Auto" MinWidth="40"/> 
                </DataGrid.Columns>
            </DataGrid>
        </StackPanel>
    </Grid>
</local:DocumentBase>